﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="description" content="">
    <meta name="author" content="">
    <title>@ViewBag.Title</title>
    <style>
		  body {

			padding-top: 60px;
			/*60px to make the container go all the way to the bottom of the topbar*/

		  }
    </style>
	<link href="@Url.Content("~/Content/bootstrap/css/bootstrap-responsive.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/bootstrap/css/bootstrap.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</a>
					<a class="brand" href="/Home/">HR Gull</a>
				<div class="nav-collapse">
					<ul class="nav">
						<li><a href="#about">Um HR Gull</a></li>
						<li><a href="/Home/Webstore">Vefbúð</a></li>
					</ul>
					<form class="navbar-search pull-right">
						<input type="text" class="search-query" placeholder="Leita">
					</form>
				</div>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="span4 offset4">
				<img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-prn1/531203_10150737330524550_731554549_9663563_1500872126_n.jpg" alt="Hr gull"/>
			</div>
		</div>
		<div class="row">
    		<div class="span2">
				@if (User.Identity.IsAuthenticated)
	{
				<div class="well" style="padding: 8px 0 0 0;height:550px">
					<ul class="nav nav-list">
						<li class="nav-header">Aðalvalmynd</li>
						<li><a href="/Home"><i class="icon-home"></i> Forsíða</a></li>
					
						<!--Aðeins umsjónarmaður sér þetta-->
						@if (User.IsInRole("admin"))
						{
							<li><a href="/Game/games"><i class="icon-play-circle"></i> Leikir</a></li>
							<li><a href="/Announcement/Announcements"><i class="icon-bullhorn"></i>Tilkynningar</a></li>
						}
						
						<!--Aðeins kennari sér þetta-->
						@if (User.IsInRole("teacher"))
						{
							<li><a href="/Game/games"><i class="icon-play-circle"></i> Leikir</a></li>
							<li><a href="/Announcement/Announcements"><i class="icon-user"></i>Tilkynningar</a></li>
						}
					
						@*Allir sjá þetta*@
						<li><a href="/User/allUsers"><i class="icon-user"></i> Notendur</a></li>

						@*Aðeins nemandi sér þetta-->*@
						@if (User.IsInRole("Student"))
	  {
							<li><a href="/Game/userGames"><i class="icon-play-circle"></i> Leikir</a></li>
	  }
					</ul>
				</div>
	}
		</div>
		

		<div class="span8">

			@RenderBody()

		</div>
		@*Aðeins innskráður notandi sér þetta-->*@
		@if (User.Identity.IsAuthenticated)
  {
			<div class="span2">
				<div class="well" style="padding: 8px 0 0 0;height:550px">
				<div class="row">
				</div>
				<ul class="nav nav-list">
					@Html.Partial("_LogOnPartial")
					<li class="divider"></li>
					<li class="nav-header">Flýtiaðgerðir</li>
					<!--Bara notandi í admin grúppunni sér þessa blokk-->
					@if (User.IsInRole("admin"))
	 {
						<li><a href="/Game/CreateGame"><i class="icon-info-sign"></i>Skrá leik</a></li>
						<li><a href="/Account/Register"><i class="icon-info-sign"></i>Skrá notanda</a></li>
	 }
				</ul>
				</div> <!-- /well -->
			</div>  
  }
		</div>
	</div>
	<!-- Le javascript

	================================================== -->

	<!-- Placed at the end of the document so the pages load faster -->
	<script src="@Url.Content("~/Content/bootstrap/js/jquery.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-transition.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/js/bootstrap-alert.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/js/bootstrap-modal.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/js/bootstrap-dropdown.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-scrollspy.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-tab.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-tooltip.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-popover.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-button.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-collapse.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-carousel.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/bootstrap/js/bootstrap-typeahead.js")" type="text/javascript"></script>
	</body>
</html>
